<div class="control-group">
    <? $name_id = preg_replace('/[^a-zA-Z0-9_%\[().\]\\/-]/s', '', camelize($attribute['name']));?>
    <label class="control-label"><?=$attribute['name'];?>:</label>

    <div class="controls docs-input-sizes">

    <?
            if($post_action=='EDIT'):
                if ($name_id=='name')
                {
                    $attrValue = $object[$name_id];
                }else
                {
                    $attrValue = isset($fields[$name_id]) ? 1 : 0;
                }
                endif;
        ?>
    
        <input type="checkbox" value="1" name="<?=$name_id?>" id="<?=$name_id?>" tabindex="<?=$counter?>" <?if($post_action=='EDIT' && $attrValue==1)echo 'checked="checked"';?>>
        
    </div>

</div>